home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / swingall.jar / javax / swing / JTableBeanInfo.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-07-15  |  6.9 KB  |  59 lines

  1. package javax.swing;
  2.  
  3. import java.awt.Image;
  4. import java.beans.BeanDescriptor;
  5. import java.beans.PropertyDescriptor;
  6. import java.beans.SimpleBeanInfo;
  7. import javax.swing.beaninfo.SwingBeanInfo;
  8.  
  9. public class JTableBeanInfo extends SwingBeanInfo {
  10.    private static final Class classJTable;
  11.    // $FF: synthetic field
  12.    static Class class$javax$swing$JTable;
  13.  
  14.    static {
  15.       classJTable = class$javax$swing$JTable != null ? class$javax$swing$JTable : (class$javax$swing$JTable = class$("javax.swing.JTable"));
  16.    }
  17.  
  18.    // $FF: synthetic method
  19.    static Class class$(String var0) {
  20.       try {
  21.          return Class.forName(var0);
  22.       } catch (ClassNotFoundException var2) {
  23.          throw new NoClassDefFoundError(((Throwable)var2).getMessage());
  24.       }
  25.    }
  26.  
  27.    private PropertyDescriptor createPropertyDescriptor(String var1, Object[] var2) {
  28.       return super.createPropertyDescriptor(classJTable, var1, var2);
  29.    }
  30.  
  31.    public BeanDescriptor getBeanDescriptor() {
  32.       return ((SwingBeanInfo)this).createBeanDescriptor(classJTable, new Object[]{"preferred", Boolean.TRUE, "isContainer", Boolean.FALSE, "shortDescription", "<A description of this component>."});
  33.    }
  34.  
  35.    public Image getIcon(int var1) {
  36.       switch (var1) {
  37.          case 1:
  38.             Image var5 = ((SimpleBeanInfo)this).loadImage("beaninfo/images/JTableColor16.gif");
  39.             return var5 == null ? ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentColor16.gif") : var5;
  40.          case 2:
  41.             Image var4 = ((SimpleBeanInfo)this).loadImage("beaninfo/images/JTableColor32.gif");
  42.             return var4 == null ? ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentColor32.gif") : var4;
  43.          case 3:
  44.             Image var3 = ((SimpleBeanInfo)this).loadImage("beaninfo/images/JTableMono16.gif");
  45.             return var3 == null ? ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentMono16.gif") : var3;
  46.          case 4:
  47.             Image var2 = ((SimpleBeanInfo)this).loadImage("beaninfo/images/JTableMono32.gif");
  48.             return var2 == null ? ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentMono32.gif") : var2;
  49.          default:
  50.             return super.getIcon(var1);
  51.       }
  52.    }
  53.  
  54.    public PropertyDescriptor[] getPropertyDescriptors() {
  55.       Object[] var1 = new Object[]{"AUTO_RESIZE_OFF", new Integer(0), "JTable.AUTO_RESIZE_OFF", "AUTO_RESIZE_NEXT_COLUMN", new Integer(1), "JTable.AUTO_RESIZE_NEXT_COLUMN", "AUTO_RESIZE_SUBSEQUENT_COLUMNS", new Integer(2), "JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS", "AUTO_RESIZE_LAST_COLUMN", new Integer(3), "JTable.AUTO_RESIZE_LAST_COLUMN", "AUTO_RESIZE_ALL_COLUMNS", new Integer(4), "JTable.AUTO_RESIZE_ALL_COLUMNS"};
  56.       return new PropertyDescriptor[]{this.createPropertyDescriptor("UIClassID", new Object[]{"shortDescription", "UIClassID"}), this.createPropertyDescriptor("editing", new Object[]{"shortDescription", "editing"}), this.createPropertyDescriptor("selectionBackground", new Object[]{"bound", Boolean.TRUE, "shortDescription", "A default background color for selected cells."}), this.createPropertyDescriptor("editingRow", new Object[]{"shortDescription", "editingRow"}), this.createPropertyDescriptor("selectedRowCount", new Object[]{"shortDescription", "selectedRowCount"}), this.createPropertyDescriptor("selectedColumnCount", new Object[]{"shortDescription", "selectedColumnCount"}), this.createPropertyDescriptor("gridColor", new Object[]{"shortDescription", "gridColor"}), this.createPropertyDescriptor("showVerticalLines", new Object[]{"bound", Boolean.FALSE, "shortDescription", "Whether vertical lines should be drawn in between the cells."}), this.createPropertyDescriptor("accessibleContext", new Object[]{"shortDescription", "accessibleContext"}), this.createPropertyDescriptor("UI", new Object[]{"shortDescription", "UI"}), this.createPropertyDescriptor("preferredScrollableViewportSize", new Object[]{"bound", Boolean.FALSE, "shortDescription", "The preferred size of the viewport."}), this.createPropertyDescriptor("autoCreateColumnsFromModel", new Object[]{"bound", Boolean.FALSE, "shortDescription", "Automatically populate the columnModel when a new TableModel is submitted."}), this.createPropertyDescriptor("rowHeight", new Object[]{"bound", Boolean.FALSE, "shortDescription", "The height of the cells including the inter-cell spacing."}), this.createPropertyDescriptor("selectionModel", new Object[]{"bound", Boolean.FALSE, "shortDescription", "The selection model for rows."}), this.createPropertyDescriptor("selectedRow", new Object[]{"shortDescription", "selectedRow"}), this.createPropertyDescriptor("selectedColumn", new Object[]{"shortDescription", "selectedColumn"}), this.createPropertyDescriptor("editorComponent", new Object[]{"shortDescription", "editorComponent"}), this.createPropertyDescriptor("tableHeader", new Object[]{"bound", Boolean.FALSE, "shortDescription", "The JTableHeader instance which renders the column headers."}), this.createPropertyDescriptor("selectedColumns", new Object[]{"shortDescription", "selectedColumns"}), this.createPropertyDescriptor("scrollableTracksViewportWidth", new Object[]{"shortDescription", "scrollableTracksViewportWidth"}), this.createPropertyDescriptor("cellEditor", new Object[]{"shortDescription", "cellEditor"}), this.createPropertyDescriptor("managingFocus", new Object[]{"shortDescription", "managingFocus"}), this.createPropertyDescriptor("rowSelectionAllowed", new Object[]{"bound", Boolean.FALSE, "shortDescription", "If true, an entire row is selected for each selected cell."}), this.createPropertyDescriptor("scrollableTracksViewportHeight", new Object[]{"shortDescription", "scrollableTracksViewportHeight"}), this.createPropertyDescriptor("intercellSpacing", new Object[]{"bound", Boolean.FALSE, "shortDescription", "The spacing between the cells, drawn in the background color of the JTable."}), this.createPropertyDescriptor("model", new Object[]{"bound", Boolean.FALSE, "shortDescription", "The model that is the source of the data for this view."}), this.createPropertyDescriptor("columnSelectionAllowed", new Object[]{"bound", Boolean.FALSE, "shortDescription", "If true, an entire column is selected for each selected cell."}), this.createPropertyDescriptor("rowMargin", new Object[]{"shortDescription", "rowMargin"}), this.createPropertyDescriptor("autoResizeMode", new Object[]{"bound", Boolean.FALSE, "enumerationValues", var1, "shortDescription", "Whether the columns should adjust themselves automatically. "}), this.createPropertyDescriptor("selectionForeground", new Object[]{"bound", Boolean.TRUE, "shortDescription", "A default foreground color for selected cells."}), this.createPropertyDescriptor("cellSelectionEnabled", new Object[]{"bound", Boolean.FALSE, "shortDescription", "Select a rectangular region of cells rather than rows or columns."}), this.createPropertyDescriptor("rowCount", new Object[]{"shortDescription", "rowCount"}), this.createPropertyDescriptor("selectedRows", new Object[]{"shortDescription", "selectedRows"}), this.createPropertyDescriptor("columnModel", new Object[]{"bound", Boolean.FALSE, "shortDescription", "The object governing the way columns appear in the view."}), this.createPropertyDescriptor("editingColumn", new Object[]{"shortDescription", "editingColumn"}), this.createPropertyDescriptor("showHorizontalLines", new Object[]{"bound", Boolean.FALSE, "shortDescription", "Whether horizontal lines should be drawn in between the cells."}), this.createPropertyDescriptor("columnCount", new Object[]{"shortDescription", "columnCount"})};
  57.    }
  58. }
  59.